package com.java.basis.string;

/**
 * @author wangning
 * @create 2021-09-01 14:03
 */
public class TestSwitchString {
	public static void main(String[] args) {
		method(null);//这里的switch那个都不会走，会直接报空指针异常
	}
	public static void method(String param) {
		switch (param) {
			case "sth":
				System.out.println("it is sth");
				break;
			case "null":
				System.out.println("it is null");
				break;
			default:
				System.out.println("default");
		}
	}
}
